import React from 'react';
import styles from './index.less';

const FunctionDescribe = ({ title, describe, releaseTime }) => (
    <div className={styles.functionDescribeWrapper}>
        <h3 className={styles.functionName}>{title}</h3>
        <p
            className={styles.functionDescribe}
            // eslint-disable-next-line react/no-danger
            dangerouslySetInnerHTML={{
                __html: describe?.replace(/[\r\n]+/g, '<br />')
            }}
        ></p>
        {releaseTime && <p className={styles.releaseTime}>{releaseTime}&nbsp;上线</p>}
    </div>
);

export default FunctionDescribe;
